package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.List;

/**
 * 采购订单表 实体bean
 */
@TableName("t_purchaseOrder")
public class PurchaseOrderBean {
    /** 采购订单Id */
    @TableId(value = "pk_purchaseOrderId",type = IdType.AUTO)
    private Integer purchaseOrderId;
    /** 供应商名称 */
    @TableField("po_supplierName")
    private String supplierName;
    /** 采购员真实姓名 */
    @TableField("po_name")
    private String name;
    /** 采购时间 */
    @TableField("po_inDate")
    private LocalDate inDate=LocalDate.now();
    /** 采购订单详情信息集合 */
    @TableField(exist = false)
    private List<PurchaseInfoBean> purchaseInfoList;

    public PurchaseOrderBean() {
    }

    public PurchaseOrderBean(String supplierName, String name) {
        this.supplierName = supplierName;
        this.name = name;
    }

    public Integer getPurchaseOrderId() {
        return purchaseOrderId;
    }

    public void setPurchaseOrderId(Integer purchaseOrderId) {
        this.purchaseOrderId = purchaseOrderId;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public LocalDate getInDate() {
        return inDate;
    }

    public void setInDate(LocalDate inDate) {
        this.inDate = inDate;
    }

    public List<PurchaseInfoBean> getPurchaseInfoList() {
        return purchaseInfoList;
    }

    public void setPurchaseInfoList(List<PurchaseInfoBean> purchaseInfoList) {
        this.purchaseInfoList = purchaseInfoList;
    }

    @Override
    public String toString() {
        return "PurchaseOrderBean{" +
                "purchaseOrderId=" + purchaseOrderId +
                ", supplierName='" + supplierName + '\'' +
                ", name='" + name + '\'' +
                ", inDate=" + inDate +
                ", purchaseInfoList=" + purchaseInfoList +
                '}'+'\n';
    }
}
